package Model.Diagrams;

import Model.Core.IMachineStateElement;
import Model.Core.Impl.FinishState;
import Model.Core.Impl.StartState;
import Model.Core.Impl.State;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JPanel;

/**
 * Projeto de TCC: Editor de Diagramas de comunicação BlueJ
 * @author Jose Luz e Michele Puretachi
 */
public class StateMachine {

    private StartState startState;
    private FinishState finishState;
    private List<IMachineStateElement> stateElements;
    private String objectName;
    private JPanel manifestArea;

    public StateMachine(String objectName) {
        //TODO: temporary
        this.objectName = objectName;
    }

    public StateMachine(String objectName, StartState startState, FinishState finishState) {
        this.objectName = objectName;
        this.startState = startState;
        this.finishState = finishState;
        this.stateElements = new ArrayList<IMachineStateElement>();
    }

    public FinishState getFinishState() {
        return finishState;
    }

    public StartState getStartState() {
        return startState;
    }

    public List<IMachineStateElement> getStatesElements() {
        return stateElements;
    }

    public void addStateElements(IMachineStateElement stateElement) {
        stateElements.add(stateElement);
    }

    public String getDescription() {
        return objectName;
    }

    public void setDescription(String description) {
        this.objectName = description;
    }

    public void setManifestArea(JPanel manifestArea) {
        this.manifestArea = manifestArea;
    }

    public JPanel getManifestArea() {
        return manifestArea;
    }
}